<?php
/**
 * Created by PhpStorm.
 * User: adophper <hello@adophper.com>
 * Date: 2018/2/26
 * Time: 21:14
 */
use yii\bootstrap\ActiveForm;

?>
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-4">
            <img src="<?=$user->avatar?>" class="img-thumbnail" onerror="this.src='/static/common/images/avatar.jpg'">
        </div>
        <div class="col-xs-8">
            用户名：<?=$user->username?><br />
            昵称：<?=$user->nickname?><br />
            真实姓名：<?=$user->realname?>
        </div>
    </div>
    <div class="row" style="margin-top: 30px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#integral" data-toggle="tab">积分变动</a></li>
            <li class=""><a href="#amount" data-toggle="tab">余额变动</a></li>
        </ul>
        <div class="tab-content" style="padding: 15px;">
            <div class="tab-pane fade in active" id="integral">
                <?php
                ActiveForm::begin([
                    'id' => 'update-integral',
                    'options' => [
                        'class' => 'form-horizontal'
                    ]
                ])
                ?>
                <div class="form-group">
                    <label class="text-right col-sm-3">当前积分：</label>
                    <div class="form-inline col-sm-9 ">
                        <label class="text-success"><?=$user->integral?></label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="text-right col-sm-3">操作类型：</label>
                    <div class="form-inline col-sm-9">
                        <label class="radio radio-inline" style="margin-left: 0px; padding-left: 0; padding-top: 0;">
                            <input type="radio" name="type" value="1" checked>增加
                        </label>
                        <label class="radio radio-inline" style="padding-top: 0px;">
                            <input type="radio" name="type" value="1">减少
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label text-right col-sm-3">变动数量：</label>
                    <div class=" col-sm-9">
                        <input type="number" class="form-control" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label text-right col-sm-3">变动原因：</label>
                    <div class=" col-sm-9">
                        <textarea name="reason" class="form-control"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3">&nbsp;</label>
                    <div class="col-sm-9">
                        <button class="btn btn-success">提交</button>
                    </div>
                </div>
                <?php
                ActiveForm::end();
                ?>
            </div>
            <div class="tab-pane fade" id="amount">
                <?php
                ActiveForm::begin([
                    'id' => 'update-amount',
                    'options' => [
                        'class' => 'form-horizontal'
                    ]
                ])
                ?>
                <div class="form-group">
                    <label class="text-right col-sm-3">当前余额：</label>
                    <div class="form-inline col-sm-9 ">
                        <label class="text-success"><?=$user->credit?></label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="text-right col-sm-3">操作类型：</label>
                    <div class="form-inline col-sm-9">
                        <label class="radio radio-inline" style="margin-left: 0px; padding-left: 0; padding-top: 0;">
                            <input type="radio" name="type" value="1" checked>增加
                        </label>
                        <label class="radio radio-inline" style="padding-top: 0px;">
                            <input type="radio" name="type" value="1">减少
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label text-right col-sm-3">变动数量：</label>
                    <div class=" col-sm-9">
                        <input type="number" class="form-control" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label text-right col-sm-3">变动原因：</label>
                    <div class=" col-sm-9">
                        <textarea name="reason" class="form-control"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3">&nbsp;</label>
                    <div class="col-sm-9">
                        <button class="btn btn-success">提交</button>
                    </div>
                </div>
                <?php
                ActiveForm::end();
                ?>
            </div>
        </div>
    </div>
</div>
